home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC & Mediji 1997 October
/
PCM_9710.iso
/
programi
/
cakewalk
/
ad.1
/
Random Time.cal
< prev
next >
Wrap
Text File
|
1997-05-15
|
643b
|
34 lines
;; Random Time.cal
;;
;; Sort of an "un-quantize" command.
(do
(include "need20.cal") ; Require version 2.0 or higher of CAL
(dword wid 30)
(dword widDiv2)
(int ofs)
(getInt wid "Random time window (in ticks)?" 0 480)
(= widDiv2 (/ wid 2))
(forEachEvent
(do
(= ofs (random 0 wid))
(= ofs (- ofs widDiv2))
(if (< ofs 0) ; if shifting earlier
(if (> (* ofs -1) Event.Time) ; if more than start time
(do
(= ofs Event.Time) ; make it equal to start time
(= ofs (* ofs -1)) ; restore to negative
)
)
)
(+= Event.Time ofs) ; do it!
)
)
)